package org.jeecg.modules.settle.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.manage.entity.CaishuiTaskSettle;
import org.jeecg.modules.manage.entity.CaishuiTaskSettleItem;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Description: 任务结算
 * @Author: yfkj
 * @Date:   2023-02-20
 * @Version: V1.0
 */
public interface ICaishuiTaskSettleService extends IService<CaishuiTaskSettle> {

	/**
	 * 添加一对多
	 *
	 * @param caishuiTaskSettle
	 * @param caishuiTaskSettleItemList
	 */
	public void saveMain(CaishuiTaskSettle caishuiTaskSettle, List<CaishuiTaskSettleItem> caishuiTaskSettleItemList) ;
	
	/**
	 * 修改一对多
	 *
	 * @param caishuiTaskSettle
	 * @param caishuiTaskSettleItemList
	 */
	public void updateMain(CaishuiTaskSettle caishuiTaskSettle, List<CaishuiTaskSettleItem> caishuiTaskSettleItemList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain(String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain(Collection<? extends Serializable> idList);

	/**
	 * 结算单导入
	 *
	 * @param request
	 * @return
	 */
	public Result<?> importExcel(HttpServletRequest request,String uploadType);

	/**
	 * 结算单数据列表导入
	 *
	 * @param jsonArray
	 * @param fileName
	 * @param savePath
	 * @return
	 */
	public Map<String, Object> handleImportList(JSONArray jsonArray, String fileName, String savePath);

}
